BINARIES = ../bin/
INCLUDES = ../incl/
LIBRARIES = ../lib/
SOURCES = ../src/

CIMG_LIBRARIES = -L/usr/X11R6/lib -lm -lpthread -lX11
CFLAGS = -O2 -Wall
GXX = g++

all: image main

image:
	${GXX} img.cpp -c ${CFLAGS} -I ${INCLUDES} -o ${LIBRARIES}/img.o

main: prefilter
	${GXX} main.cpp ${CFLAGS} -I ${INCLUDES} ${LIBRARIES}/filter.o \
	       ${LIBRARIES}/img.o ${CIMG_LIBRARIES} -o ${BINARIES}/AHCTPAC

prefilter:
	${GXX} prefilter.cpp -c ${CFLAGS} -I ${INCLUDES} \
	       -o ${LIBRARIES}/filter.o
